#ifndef BTREE_H
#define BTREE_H

/*
 *  btree.h
 *
 *  Declares prototypes for the binary search tree
 */

/* Defines a btree element */
 typedef struct _btnode_elmt {
    BTData data;
    struct _btnode_elmt *left;
    struct _btnode_elmt *right;
 } * BTElmt;

/* Defines the top-level btree data type */
typedef struct _btlist {
    int size;
    BTElmt root;
} * BTree;

/* Initialization of a btree requires a valid BTData element */
BTree btree_init (BTData);

/* Insert a new data element (with a unique key) into the btree.
 * the same key is found, increment the freq counter. */
int btree_insert (BTData);

/* Remove a specific key from the btree, returning the BTData element
 * associated with it. */
BTData btree_remove (Key);

/* Search the btree for a key, returning the BTData element associated
 * with it should it exist. */
BTData btree_search (Key);

/* TODO: Inclusion of traversal functions is imminent. */

#endif /* BTREE_H */
